<!DOCTYPE html>
<html>
<head>
	<title><?php echo $slots_awards_lst;?></title>
	<meta name="viewport" content="width=device-width,user-scalable=no" />
	<meta http-equiv="content-type" content="text/html;charset=utf-8" />
	<meta name="keywords" content="2222" />
	<meta name="description" content="333333" />
	<link rel="stylesheet" type="text/css" href="<?php echo $this->config->item('public_url');?>/slots/css/winning_view.css">

</head>
<body >
	<div class="winning_view">
		<img src="<?php echo $winning_view_banner;?>" class="winning_view_banner" alt="">
		<div class="winning_view_con">

		</div>
	</div>
<script type="text/javascript" src="<?php echo $this->config->item('public_url');?>/slots/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript">
	var winning_viewUrl = "<?= site_url('Npoint_store/Slots/winning_js')?>"
</script>
<script type="text/javascript">
	$.ajax({
		url: winning_viewUrl,
		type: 'GET',
		dataType: 'json'
	})
	.done(function(data) {
		var slots_get = data.data.slots_get
		var slots_winning_name = data.data.slots_winning_name
		var slots_winning_number = data.data.slots_winning_number
		var data = data.data.data
		var html = ''
		for (var i = 0; i < data.length; i++) {
			html +='<div class="winning_view_title">'+slots_get+' '+data[i].title+'</div>'+
			'<div class="winning_view_tit2">'+slots_winning_number+'<span>'+data[i].total+'</span>'+slots_winning_name+'</div>'+
			'<div class="winning_view_list">'+
				'<ul>';
				for (var j = 0; j < data[i].detail.length; j++) {
				html+='<li><span class="winning_view_listname">'+data[i].detail[j].username+'</span><span class="winning_view_listtime">'+new Date(data[i].detail[j].create_time * 1000).getFullYear()+'-'+(parseInt(new Date(data[i].detail[j].create_time * 1000).getMonth())+1)+'-'+new Date(data[i].detail[j].create_time * 1000).getDate()+'</span></li>'
				}
				
				html+='</ul>'+
			'</div>'
		}
		$('.winning_view_con').html(html)

	})
	.fail(function() {
		console.log("error");
	})
	.always(function() {
		console.log("complete");
	});
</script>
	</body>
	</html>